/**
 * 矢量图形类，主要通过里面的graphics绘图。此对象不支持鼠标事件
 * @author zzhanglin
 * @returns {Shape}
 */
Shape = function()
{
	DisplayObject.call(this);
	this.className="Shape";
	this._graphics ;
};
FLASH.extend( Shape , DisplayObject ); //继承自DisplayObject

/**
 * 获取绘图类
 */
Shape.prototype.getGraphics = function()
{
	if(!this._graphics){
		this._graphics = new Graphics(); 
	}
	return this._graphics ;
};

/**
 * 输出
 * @param globalAlpha 
 * @param context
 */
Shape.prototype._draw =function( globalAlpha,context )
{
	context.globalAlpha=globalAlpha ;
	context.setTransform( this._worldModelMatrix._a ,this._worldModelMatrix._b,this._worldModelMatrix._c,this._worldModelMatrix._d,
			this._worldModelMatrix._tx,this._worldModelMatrix._ty );
	context.drawImage(this._graphics._getContextCanvas(), 0 , 0 );
};

/**
 * 释放资源
 */
Shape.prototype.dispose = function()
{
	DisplayObject.prototype.dispose.call(this);
	if(this._graphics){
		this._graphics._dispose();
		this._graphics = null ;
	}
};